WEBAPP['pageDevUrl'] = WEBAPP['pageDevBase64'] = function() {
	$('.dev-form').on('submit', function() {
		var F = $(this);
		console.log('hi');
		$.post('/json/dev/' + F.find('.act').val(), F.serialize(), function(data) {
			if (data) {
				$('.' + data.act + '-output').val(data.result);
			}
		}, 'json');

		// clear
		F = null;

		return false;
	});
};
WEBAPP['pageDevUrlUnload'] = WEBAPP['pageDevBase64Unload'] = function() {
	$('.base64-form').off('submit');
};

WEBAPP['pageDevMyIp'] = function() {
	var T = $('#speed-test-button');
	if (!T.data('binded')) {
		T.data('binded', true).on(
				'shown.bs.tab',
				function(e) {
					$('#speedCheckerWrap').append(
							'<script language="javascript">sc_bgc="0x123456";sc_bc="0x000000";sc_hc="0xFF9933";sc_cc="0x000000";sc_w=400;sc_location="VN";sc_skin="";sc_userid=31112020;</script>'
									+ '<script src="http://s3.amazonaws.com/speedchecker/speedchecker.js"></script>');
				});
	}
	// clear
	T = null;
};
WEBAPP['pageDevMyIpUnload'] = function() {
	$('#speed-test-button').off('shown.bs.tab');
};

WEBAPP['pageDevUserAgentInfo'] = function() {
	var width = height = '?';
	if (self.screen) {
		width = screen.width
		height = screen.height
	}
	// for NN3 w/Java
	else if (self.java) {
		var javakit = java.awt.Toolkit.getDefaultToolkit();
		var scrsize = javakit.getScreenSize();
		width = scrsize.width;
		height = scrsize.height;
	}

	$('#screenRes').text(width + 'x' + height);
	$('#screenColorDepth').text(screen.colorDepth);
};